﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FM.接口;
using Microsoft.Practices.Prism.Mvvm;

namespace FM.Common
{
    public class 树 : BindableBase, IId
    {
        private I树枝 _选择项;
        private bool _可展开;
        private bool _is展开;
        private bool _is选中;
        private int _id;
        private string _名称;

        public 树()
        {
            子 = new ObservableCollection<I树枝>();
        }

        public int ID
        {
            get { return _id; }
            set { SetProperty(ref _id, value); }
        }

        public string 名称
        {
            get { return _名称; }
            set { SetProperty(ref _名称, value); }

        }

        public bool Is选中
        {
            get { return _is选中; }
            set { SetProperty(ref _is选中, value); }

        }

        public bool Is展开
        {
            get { return _is展开; }
            set { SetProperty(ref _is展开, value); }

        }

        public bool 可展开
        {
            get { return _可展开; }
            set { SetProperty(ref _可展开, value); }

        }

        public int 深度 { get; set; }

        public I树枝 选择项
        {
            get { return _选择项; }
            set { SetProperty(ref _选择项, value); }
        }

        public dynamic 数据 { get; set; }
        public ObservableCollection<I树枝> 子 { get; set; }

    }
}
